<?php

class Datas_Core_Log
{
	protected $_id;
	protected $_priority;
	protected $_message;
	protected $_timestamp;
	protected $_username;
	protected $_type;

	public function setId($id) {
		$this->id = (int) $id;
	}

	public function getId() {
		return $this->id;
	}

	public function setPriority($priority) {
		$this->priority = $priority;
	}
	public function getPriority() {
		return $this->priority;
	}

	public function setMessage($message) {
		$this->message = $message;
	}

	public function getMessage() {
		return $this->message;
	}

	public function setTimestamp($timestamp) {
		if (is_string($timestamp)) {
			$this->timestamp = date('r',strtotime($timestamp));
		} else {
			$this->timestamp = $timestamp;
		}
	}

	public function getTimestamp() {
		return $this->timestamp;
	}

	public function setUsername($username) {
		$this->username = $username;
	}

	public function getUsername() {
		return $this->username;
	}

	public function setType($type) {
		$this->type = $type;
	}

	public function getType() {
		return $this->type;
	}
}
